package com.wskj.library.dao.impl;

import com.wskj.library.pojo.*;

import com.wskj.library.dao.*;

import java.util.List;

/**
 * roleInfo dao接口类实现类
 * 2018-03-22 T148
 */ 
public class RoleInfoDaoImpl extends BaseDao implements RoleInfoDao{

	 @Override
	 public int addRoleInfo(RoleInfo  roleInfo){
		 String sql="insert into roleInfo  values  ()";
		 Object[] params= {};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public int deleteById(int id){
		 String sql="delete from roleInfo  where rid=? ";
		 Object[] params= {id};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public int updateRoleInfo(RoleInfo roleInfo){
		 String sql="update roleInfo set ";
		 Object[] params= {};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public RoleInfo getRoleInfoById(int id){
		 String sql="select * from roleInfo where rid=? ";
		 Object[] params= {id};
		 return super.queryOne(sql, params,RoleInfo.class);
	 }
	 @Override
	 public  List<RoleInfo>  getAllRoleInfos(){
		 String sql="select * from roleInfo";
		 Object[] params= null;
		 return super.queryAll(sql, params, RoleInfo.class);
	 }
}

